package org.exez.modules.visitor.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.exez.modules.visitor.entity.Accompanying;
import org.exez.modules.visitor.entity.AccompanyingCopy;
import org.exez.modules.visitor.mapper.AccompanyingCopyMapper;
import org.exez.modules.visitor.service.IAccompanyingCopyService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 外侧访客随行
 * @Author: exez-boot
 * @Date:   2020-08-13
 * @Version: V1.0
 */
@Service
public class AccompanyingCopyServiceImpl extends ServiceImpl<AccompanyingCopyMapper, AccompanyingCopy> implements IAccompanyingCopyService {

    @Override
    public List<AccompanyingCopy> listAccompanyingByApplicationId(Integer applicationId) {
        LambdaQueryWrapper<AccompanyingCopy> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(AccompanyingCopy :: getReservationApplicationId,applicationId);
        List<AccompanyingCopy> accompanyings = baseMapper.selectList(queryWrapper);

        return accompanyings;
    }
}
